The present invention relates to an apparatus and method for storing update history information of a main memory required to realize a memory state restore function for restoring contents of the main memory of a computer system.
This application is based on Japanese Patent Application No. 8-279027, filed Sep. 30, 1996, the content of which is incorporated herein by reference.
In a normal computer system, when a program is executed and processing once proceeds, no processing can be generally restarted by returning memory contents to a previous state.
However, in the following application techniques of various kinds, it is desirable to have a function (a memory status restore function) for returning the memory contents to a previous state and continuing the processing from that time point.
(1) Software Debugging
When a certain error occurs during execution of a program, a cause of this error can be analyzed by returning to a previous state.
(2) Fault Tolerant System
When no processing can be continuously performed due to a certain fault during an operation of the system, the system can be continuously operated without stopping this system by returning the system to a previous state and restarting processing from this state.
For example, such a fault tolerant technique is disclosed in Philip A Bernstein, "Sequoia: A Fault-Tolerant Tightly Coupled Multiprocessor for Transaction Processing," IEEE Computer, Vol.21, No.2, 1988.
(3) Back Tracking
In a programming language of a logic type, back tracking in an executing state is a basic operation. The back tracking can be realized by using a function for returning the contents of a memory to a previous state.
A "backward technique" is one of techniques considered as a method for realizing the above memory state restore function. For example, such a technique is disclosed in Rok Sosic, "History Cache: Hardware Support for Reverse Execution" Computer Architecture News, Vol.22, No.5, 1994.
FIG. 1 shows the construction of a conventional typical computer system required to realize the memory state restore function using the "backward technique".
In the system of FIG. 1, N CPUs 31.sub.1 to 31.sub.N and N cache memories 41.sub.1 to 41.sub.N respectively corresponding to these CPUs are arranged. The cache memories 41.sub.1 to 41.sub.N are connected to a memory controller 60 through a system bus 50.
The memory controller 60 is connected to a main memory 70 and a before-image buffer 80 and controls access to the main memory 70 and the before-image buffer 80. The before-image buffer 80 is used to hold update history information (before-image). The update history information is constructed by a set of previous data of the main memory 70 and its address.
When a writing request for the main memory 70 is issued, the memory controller 60 reads previous data from the main memory 70 before the actual write access to the main memory 70. The memory controller 60 then writes these read data and a corresponding update address to the before-image buffer 80.
Contents of the main memory 70 can be restored in a state prior to occurrence of a fault by this construction only by writing-back the update history information from the before-image buffer 80 to the main memory 70 when a fault occurs.
However, in this system, it is necessary to assemble a buffer access control function for controlling access to the before-image buffer 80, a state storing control function for controlling various kinds of functions required to hold a state of the main memory 70, etc. into the memory controller 60. Therefore, no existing memory controller can be utilized so that a dedicated memory controller for the memory controller 60 :must be newly developed. Accordingly, it is really difficult to realize the memory state restore function by using the existing computer system as it is.